package org.wxl.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 王学良
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("order_details")
public class orderDetailsEntity {
    /**
     * CREATE TABLE `order_details` (
     *   `uuid` CHAR(36) NOT NULL COMMENT '订单详情ID',
     *   `order_id` CHAR(36) NOT NULL COMMENT '订单ID',
     *   `product_id` CHAR(36) NOT NULL COMMENT '商品ID',
     *   `quantity` INT UNSIGNED NOT NULL COMMENT '购买数量',
     *   `price_at_purchase` DECIMAL(10,2) NOT NULL COMMENT '购买时单价',
     *   PRIMARY KEY (`uuid`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单详情表';
     */
    @TableId
    @Schema(description = "订单详情ID")
    private String uuid;

    @Schema(description = "订单ID")
    private String orderId;

    @Schema(description = "商品ID")
    private String productId;

    @Schema(description = "购买数量")
    private Integer quantity;

    @Schema(description = "购买时单价")
    private Double priceAtPurchase;

}
